import request from './request'

/**
 * 获取统计概览
 * @returns {Promise}
 */
export function getStatisticsOverview () {
  return request({
    url: '/statistics/overview',
    method: 'get'
  })
}

/**
 * 获取趋势数据
 * @param {Object} params
 * @param {string} params.type - 类型(order/reservation/foster)
 * @param {string} params.startDate - 开始日期
 * @param {string} params.endDate - 结束日期
 * @returns {Promise}
 */
export function getTrendData (params) {
  return request({
    url: '/statistics/trend',
    method: 'get',
    params
  })
}

